﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="AllReturnToFactoryList.aspx.cs" Inherits="WXYW.AllReturnToFactoryList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitlePlaceHolder" runat="server">
    所有返厂申请单
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ButtonPlaceHolder" runat="server">
    关键字<asp:TextBox ID="keyWordTextBox" runat="server" Height="16px"></asp:TextBox> <asp:ImageButton ImageUrl="~/image/icon_search2.gif" runat="server" OnClick="searchLinkButton_Click" />&nbsp;<asp:LinkButton ID="resetLinkButton" runat="server" OnClick="resetLinkButton_Click">清除</asp:LinkButton>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="RightContentPlaceHolder" runat="server">
   <asp:GridView ID="returnToFactoryFormsGridView" runat="server" AutoGenerateColumns="False"
        Width="100%" CssClass="tableList" BorderWidth="1px" BorderColor="#888888" 
        AllowPaging="True" AllowSorting="True" PageSize="20" 
        onpageindexchanging="returnToFactoryFormsGridView_PageIndexChanging" 
        onrowdatabound="returnToFactoryFormsGridView_RowDataBound" 
        EnableModelValidation="True">
        <Columns>
            <asp:TemplateField HeaderImageUrl="~/image/operateicon/button_Select.gif">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="IDLbl" runat="server"></asp:Label>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
            </asp:TemplateField>
            <asp:BoundField HeaderText="工厂RMA#" DataField="Code" >
            <HeaderStyle Wrap="False" />
            <ItemStyle Wrap="False" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="RMA#" SortExpression="ApplicationProduct.ApplicationForm.ApplicationCode">
                <ItemTemplate>
                    <%#Eval("ApplicationProduct.ApplicationForm.ApplicationCode") %>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="产品型号">
                <ItemTemplate>
                    <%#Eval("ApplicationProduct.ProductType.ProductTypeName") %>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="产品序号">
                <ItemTemplate>
                    <%#Eval("ApplicationProduct.ProductSerialNumber")%>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
            </asp:TemplateField>
             <asp:TemplateField HeaderText="供应商代码">
                <ItemTemplate>
                    <%#Eval("ProvideCode")%>
                </ItemTemplate>
                 <HeaderStyle Wrap="False" />
                 <ItemStyle Wrap="False" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="RMA申请日期" >
                <ItemTemplate>
                    <%#Convert.ToDateTime(Eval("ApplicationProduct.ApplicationForm.ApplicationDateTime")).ToString("yyyy-MM-dd")%>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="返厂申请日期" >
                <ItemTemplate>
                    <%#Convert.ToDateTime(Eval("ApplyDate")).ToString("yyyy-MM-dd")%>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
            <asp:BoundField HeaderText="状态" DataField="Status">
            <HeaderStyle Wrap="False" />
            <ItemStyle Wrap="False" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="查看">
                <ItemTemplate>
                    <img src="image/operateicon/docview.gif" alt="" />
                    <asp:LinkButton ID="rtfLinkButton" runat="server" OnClick="rtfLinkButton_Click"
                        CommandArgument='<%#Eval("ID") %>'>查看</asp:LinkButton>
                </ItemTemplate>
                <HeaderStyle Wrap="False" />
                <ItemStyle Wrap="False" />
            </asp:TemplateField>
        </Columns>
        <PagerTemplate>
             本类记录<span style="color: Red"><%= RecordsNumber%></span>条,
            <span style="color: Red">20</span>条/页 当前 <span style="color: Red">
                <%= Convert.ToInt32(Page.Session["PageIndex"])+ 1%>/<%= PageCount%></span>页
            <asp:LinkButton ID="LinkButton1" runat="server"
                Style="color: blue" onclick="LinkButton1_Click">首页</asp:LinkButton><asp:LinkButton 
                    ID="LinkButton2" runat="server" Style="color: blue" 
                onclick="LinkButton2_Click">|上一页</asp:LinkButton>
            <asp:LinkButton ID="LinkButton3" runat="server"
                Style="color: blue" onclick="LinkButton3_Click">下一页</asp:LinkButton><asp:LinkButton 
                    ID="LinkButton4" runat="server" Style="color: blue" 
                onclick="LinkButton4_Click">|尾页</asp:LinkButton>
            转到<asp:DropDownList ID="pageDDL" runat="server" AutoPostBack="True" OnSelectedIndexChanged="pageDDL_SelectedIndexChanged">
            </asp:DropDownList>
        </PagerTemplate>
        <HeaderStyle ForeColor="White" Font-Bold="True" BackColor="#A55129"></HeaderStyle>
    </asp:GridView>
</asp:Content>
